{profiles, [{prod, [{relx, [{dev_mode, false}
                           ,{include_erts, true}
                           ,{include_src, false}
                           ]}
                   ]}
           ]}.

{erl_opts, [debug_info
           ,warnings_as_errors
           ,warn_unused_vars
           ,{i, "src"}
           ]}.

{xref_checks, [undefined_function_calls
              ,undefined_functions
               %% ,exports_not_used
              ,locals_not_used
              ,deprecated_function_calls
              ,deprecated_functions
              ]}.
{xref_ignores, [helloworld_pb
               ]}.

{deps, [{grpcbox, {git, "https://github.com/tsloughter/grpcbox.git", {branch, "main"}}}
       ,{chatterbox, {git, "https://github.com/tsloughter/chatterbox.git", {branch, "master"}}}
       ]}.

{grpc, [{protos, "../proto/helloworld"}
        %% https://hexdocs.pm/gpb/gpb_compile.html
       ,{gpb_opts, [{module_name_suffix, "_pb"}
                   ,strings_as_binaries
                   ,type_specs
                   ,{verify, always}
                   ,report
                   ]}
       ]}.

%% {project_plugins, [grpcbox_plugin TODO(fenollp): replace whence https://github.com/tsloughter/grpcbox_plugin/pull/16#issuecomment-1008303451
{project_plugins, [{grpcbox_plugin, {git, "https://github.com/tsloughter/grpcbox_plugin.git", {branch, "master"}}}
                  ]}.

{shell, [{apps, [erlang_grpcbox_bench]}
        ,{config, "config/sys.config"}
        ]}.

{relx, [{release, {erlang_grpcbox_bench, "1.0.0"}, [erlang_grpcbox_bench]}
       ,{dev_mode, true}
       ,{include_erts, false}
        %% ,{vm_args,    "config/vm.args"}
       ,{sys_config, "config/sys.config"}
       ]}.

{xref_checks, [undefined_function_calls
              ,undefined_functions
               %% ,exports_not_used
              ,locals_not_used
              ,deprecated_function_calls
              ,deprecated_functions
              ]}.
{xref_ignores, [helloworld_pb
               ]}.
